#include <stdio.h>

unsigned int rotate_right(unsigned int x, unsigned int y) {
    y %= 32;
    if (y == 0) {
        return x;
    }

    unsigned int high_part = x >> (32 - y);
    unsigned int shifted = x << y;
    return shifted | high_part;
}

int main() {
    unsigned int a, b;
    printf("请输入十六进制无符号整数和移动位数: ");
    scanf("%x %u", &a, &b);
    
    unsigned int result = rotate_right(a, b);
    printf("rotate_right(0x%x, %u) = 0x%x\n", a, b, result);
    
    return 0;
}